{% extends "./layout.html" %} {% block title %}My Profile{% endblock %} {% block content %}
<div class="row">
    <div class="col-lg-12">

        {% if updateSuccess %}
        <div class="row">
            <div class="col-lg-12">
                <div class="alert alert-dismissable alert-success">
                    <button type="button" class="close" data-dismiss="alert">&times;</button>
                    Profile updated successfully.
                </div>
            </div>
        </div>
        <!-- /.row -->
        {% endif %}
    </div>
</div>

{% if updateError %}
<div class="row">
    <div class="col-lg-12">
        <div class="alert alert-dismissable alert-danger">
            <button type="button" class="close" data-dismiss="alert">&times;</button>
            {{updateError}}
        </div>
    </div>
</div>
<!-- /.row -->
{% endif %}

<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-info">
            <div class="panel-heading">
                <h3 class="panel-title">Edit Profile</h3>
            </div>
            <div class="panel-body">
                <form role="form" method="post" action="/profile">
                    <div class="form-group">
                        <label for="firstName">First Name</label>
                        <input type="text" class="form-control" id="firstName" name="firstName" value="{{firstNameSafeString}}" placeholder="Enter first name">
                    </div>
                    <div class="form-group">
                        <label for="lastName">Last Name</label>
                        <input type="text" class="form-control" id="lastName" name="lastName" value="{{lastName}}" placeholder="Enter last name">
                    </div>
                    <div class="form-group">
                        <label for="ssn">SSN</label>
                        <input type="text" class="form-control" id="ssn" name="ssn" value="{{ssn}}" placeholder="Enter SSN">
                    </div>
                    <div class="form-group">
                        <label for="dob">Date of Birth</label>
                        <input type="date" class="form-control" id="dob" name="dob" value="{{dob}}" placeholder="Enter date of birth">
                    </div>
                    <div class="form-group">
                        <label for="bankAcc">Bank Account #</label>
                        <input type="text" class="form-control" id="bankAcc" name="bankAcc" value="{{bankAcc}}" placeholder="Enter bank account number">
                    </div>
                    <div class="form-group">
                        <label for="bankRouting">Bank Routing #</label>
                        <input type="text" class="form-control" id="bankRouting" name="bankRouting" value="{{bankRouting}}" placeholder="Enter bank routing number">
                        <p class="help-block">Must be entered as digits with a suffix of #. For example: 0198212# </p>
                    </div>
                    <div class="form-group">
                        <label for="address">Address</label>
                        <input type="text" class="form-control" id="address" name="address" value="{{address}}" placeholder="Enter address">
                    </div>
                    <div class="form-group">
                        <label for="website">Website</label>
                        <input type="text" class="form-control" id="website" name="website" value="{{website}}"
                            placeholder="https://">
                    </div>
                    <input type="hidden" name="_csrf" value="{{csrftoken}}" />
                    <button type="submit" class="btn btn-default" name="submit">Submit</button>

                    <!-- @FIXME use a properly escaped variable that matches the URL context, for example
                    refer to a firstNameSafeURLString field on the doc object set by the controller for this template -->
                    <a href="{{firstNameSafeString}}">Google search this profile by name</a>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %}